<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	request.setCharacterEncoding("utf-8");
	String cp = request.getContextPath();
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>게 시 판</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>

<link rel="stylesheet" href="<%=cp%>/info/css/created.css" type="text/css"/>

<script type="text/javascript" src="<%=cp%>/board/js/util.js"></script>
<script type="text/javascript">

	function updateData(){
		
		var num = "${dto.num}";
		var pageNum = "${pageNum}";
		var search = "${search}";
		
		var param = "pageNum=" +pageNum+ "&num=" +num;
		var url = "<%=cp%>/community/e_updated.action?"+param;
		url += search;
		
		location.replace(url);
	}
	
	function deleteData(){
		
		var num = "${dto.num}";
		var pageNum = "${pageNum}";
		var params = "${params}";
		
		var param = "pageNum=" +pageNum+ "&num=" +num;
		var url = "<%=cp%>/community/e_deleted.action?"+param;
		
		location.replace(url);
	}
</script>

</head>

<body>

	<div id="container">
		<div id="subNavigation">
			<h2><img src="<%=cp%>/community/image/h2_community.gif" alt="커뮤니티" /></h2>
			<ul class="leftMenu">
                <li><a href='<%=cp%>/community/hugi.action'><img src='<%=cp%>/community/image/subnavi_community1_on.gif' class='imgover' alt='여행후기' /></a></li>
                <li><a href='<%=cp%>/community/gallary.action'><img src='<%=cp%>/community/image/photo.gif' class='imgover' alt='포토갤러리' /></a></li>
                <li><a href='<%=cp%>/community/event.action'><img src='<%=cp%>/community/image/subnavi_community2_on.gif' class='imgover' alt='진행중인 이벤트' /></a></li>
                <li><a href='<%=cp%>/community/e_list.action'><img src='<%=cp%>/community/image/subnavi_community3_on.gif' alt='당첨자발표' /></a></li>
			</ul>
			<ul class="boardLink">
				<li><a href="<%=cp%>/info/s_created.action"><img src="<%=cp%>/community/image/main_qna.gif" alt="질문과 답변" /></a></li>
				<li><a href="<%=cp%>/info/qna.action"><img src="<%=cp%>/community/image/main_faq.gif" alt="자주하는 질문" /></a></li>
			</ul>
		</div>


		<div id="contents">
			<div class="titleArea">
				<h3><img src="<%=cp%>/community/image/h2_winner_announcement.gif" alt="공지사항" /><span class="visualImg"><img src="<%=cp%>/community/image/img_visual.gif"  alt="비주얼이미지" /></span></h3>
			</div>
 
				<table cellpadding="0" cellspacing="0" class="tbViewType1" summary="여행후기" width="100%">
            
				<caption></caption>
				<colgroup>
					<col width="15%" />
					<col width="*" />
					<col width="15%" />
					<col width="8%" />
				</colgroup>
				<tbody>
					<tr>
						<th><img src="<%=cp%>/info/image/subject3.gif"  alt="제목" /></th>
						<td colspan="3"><strong><b>${dto.subject}</b></strong></td>
					</tr>
					<tr>
						<th><img src="<%=cp%>/community/image/img_th_period.gif" alt="기간" /></th>
						<td>${dto.period}</td>
						<th><img src="<%=cp%>/info/image/hitCount3.gif"  alt="조회수" /></th>
						<td>${dto.hitCount}</td>
					</tr>
					<tr>
						<td colspan="4" class="noticeText">
							<P>${dto.content}</P>
					</tr>
				</tbody>
			</table>
			
			<div class="btnType1">
			<c:if test="${userId == 'admin'}">
               <div>
			    	<span><a href="javascript:updateData()" ><img src="<%=cp%>/info/image/modify.gif" alt="수정" /></a> 
                          <a href="javascript:deleteData()" ><img src="<%=cp%>/info/image/delete.gif" alt="삭제" /></a></span>                        
                </div>
            </c:if>
                <a href="javascript:location.href='<%=cp%>/community/e_list.action'">
                <img src="<%=cp%>/info/image/list.gif" alt="목록" /></a>			
			</div> 
			<br/>
			<br/>
			<table cellpadding="0" cellspacing="0" class="tbViewType1" summary="다른글보기" width="100%">
				<caption></caption>
				<colgroup>
					<col width="15%" />
					<col width="*" />
				</colgroup>
				<tbody>
					<tr>
						<th><img src="<%=cp%>/info/image/pre.gif" alt="이전글" /></th>
						<td><c:if test="${!empty nextSubject}">
							<a href="<%=cp%>/community/e_article.action?${params}&num=${nextNum}">${nextSubject}</a>
							</c:if>
						</td>
					</tr>
					<tr>
						<th><img src="<%=cp%>/info/image/next.gif"  alt="다음글" /></th>
						<td><c:if test="${!empty preSubject}">
						<a href="<%=cp%>/community/e_article.action?${params}&num=${preNum}">${preSubject}</a>
						</c:if>
                        </td>
					</tr>
				</tbody>
            
			</table>
			
		</div>
	</div>

</body>

</html>